解决UE4加载网页帧率不足60fps的问题 您所在的位置:网站首页 ue4 webgl 解决UE4加载网页帧率不足60fps的问题

解决UE4加载网页帧率不足60fps的问题

2023-08-13 17:02| 来源: 网络整理| 查看: 265

问题产生原因

UE4.24到4.26中引擎默认启用WebGL,这会导致在使用WebUI插件等其它方法打开网页时实际帧率达不到60fps,

解决方法

修改/ Engine / Source / Runtime / WebBrowser / Private / CEF目录里的CEFBrowserApp.cpp文件。 找到FCEFBrowserApp::OnBeforeCommandLineProcessing:

void FCEFBrowserApp::OnBeforeCommandLineProcessing(const CefString& ProcessType, CefRefPtr CommandLine) { CommandLine->AppendSwitch("enable-gpu"); CommandLine->AppendSwitch("enable-gpu-compositing"); CommandLine->AppendSwitch("enable-begin-frame-scheduling"); }

修改为:

void FCEFBrowserApp::OnBeforeCommandLineProcessing(const CefString& ProcessType, CefRefPtr CommandLine) { CommandLine->AppendSwitch("disable-gpu"); CommandLine->AppendSwitch("disable-gpu-compositing"); CommandLine->AppendSwitch("enable-begin-frame-scheduling"); }

编译成功后即可解决问题。

UE4.26.2版本编译后的.dll文件

下载地址:https://gitee.com/ProgrammerLuo/temporary-warehouse/blob/master/WebBrowser/UE4Editor-WebBrowser.dll 参考:https://github.com/tracerinteractive/UnrealEngine/tree/4.26



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有